package com.hellobike.haxing.modules.operate.enums;

import lombok.Getter;

@Getter
public enum PageComponentTypeEnum {

    A(1, "图片"),
    B(2, "优惠券"),
    C(3, "商品")
    ;

     PageComponentTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;
    private String desc;

    public static PageComponentTypeEnum getByValue(int value){
        for (int i = 0; i < PageComponentTypeEnum.values().length; i++) {
            PageComponentTypeEnum pageComponentTypeEnum = PageComponentTypeEnum.values()[i];
            if(pageComponentTypeEnum.getValue()==value){
                return pageComponentTypeEnum;
            }
        }
        return null;
    }
}
